package org.apache.flink.runtime.resourceprovider.slot;

import java.io.IOException;
import java.util.Collection;
import java.util.Collections;

/** {@link SlotAllocationSnapshotPersistenceService} that does nothing. */
public enum NoOpSlotAllocationSnapshotPersistenceService
        implements SlotAllocationSnapshotPersistenceService {
    INSTANCE;

    @Override
    public void persistAllocationSnapshot(SlotAllocationSnapshot slotAllocationSnapshot)
            throws IOException {}

    @Override
    public void deleteAllocationSnapshot(int slotIndex) {}

    @Override
    public Collection<SlotAllocationSnapshot> loadAllocationSnapshots() {
        return Collections.emptyList();
    }
}
